package com.xx.job.controller;

import com.xx.job.common.CommonResult;
import com.xx.job.entity.Payment;
import com.xx.job.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/consumer")
public class ConsumerController {

    @Autowired
    private PaymentService paymentService;

    @GetMapping("/selectById/{id}")
    public CommonResult selectById(@PathVariable Long id){
        return paymentService.selectById(id);
    }

    @GetMapping("/insert")
    public CommonResult insert( Payment payment){
        return paymentService.insert(payment);
    }
    @GetMapping("/timeOut")
    public CommonResult timeOut(){
        return paymentService.timeOut();
    }

}
